Skip to content

Close transport on broker server disconnect#111

Merged
julian-graf merged 4 commits into
obabec:mainfrom
kkocdko:fix-keep-alive
May 3, 2026
Merged

Close transport on broker server disconnect#111
julian-graf merged 4 commits into
obabec:mainfrom
kkocdko:fix-keep-alive

Conversation

@kkocdko
Copy link
Copy Markdown
Contributor

@kkocdko kkocdko commented Apr 26, 2026

Fixed #110

@julian-graf
Copy link
Copy Markdown
Collaborator

Thanks for the PR. The CI failure is weird, especially because it seems to be related to a test you haven't modified. I'll check out what is happening here.

@julian-graf
Copy link
Copy Markdown
Collaborator

julian-graf commented Apr 27, 2026

Alright, I figured out the issue. HiveMQ responds with a DISCONNECT on keep alive timeout which leads to an MqttError::Disconnect followed by MqttError::RecoveryRequired's. This leads to the break pattern in the test never matching. Additionally, the tokio::timeout never fires either because the loop turns into a hot loop not reaching a single await point once this error has occured. Mosquitto just closes the connection so an MqttError::Network is returned. The other tests already check for both conditions not sure why just this one didn't.

Do you want to fix this or should I? In the latter case, I'd add this to the changelog etc. as well.

@kkocdko
Copy link
Copy Markdown
Contributor Author

kkocdko commented Apr 28, 2026

@julian-graf I might be busy these days, feel free to reuse/copy/modify/close this PR :)

@julian-graf julian-graf merged commit 96bbe32 into obabec:main May 3, 2026
7 checks passed
@kkocdko kkocdko deleted the fix-keep-alive branch May 7, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: When to call client.abort() ?

2 participants